CS 157 : Assignment 3
نویسنده
چکیده
In this write-up, we extend quicksort to the task of fuzzy sorting of intervals. In many situations the precise value of a quantity is uncertain (e.g., any physical measurement is subject to noise). For such situations we may represent a measurement i as a closed interval [ai, bi], where ai ≤ bi. A fuzzysort is defined as a permutation 〈i1, i2, . . . , in〉 of the intervals such that there exist cj ∈ [aij , bij ] satisfying c1 ≤ c2 ≤ . . . ≤ cn. This document summarizes the design of a fuzzy sorting algorithm which operates in-place on two arrays containing the interval endpoints. The proposed algorithm has the general structure of randomized quicksort. As a result, its expected running time is Θ(n lg n) for disjoint intervals. The presence of overlapping intervals is detected and reduces the expected running time. In fact, the proposed algorithm has an expected running time Θ(n) when all intervals overlap at some point. This document is organized in four sections. In Section 1 we introduce the basic strategy for fuzzy-sorting and a linear-time algorithm to detect the intersection of a set of intervals. In Section 2 we modify randomized quicksort to allow fuzzy sorting. In Section 3 we present a proof of correctness. Finally, in Section 4 we analyze the expected running time of the proposed algorithm.
منابع مشابه
CS 157 : Assignment 4 Douglas
This write-up presents the design and analysis of several algorithms for determining the maximum sum of certain subsets of one-dimensional arrays. In the first section, we consider the Maximum Subsequence Sum (MSS) problem: given an array A with signed integer elements, find a contiguous subarray with the maximum possible sum. In Section 2, we extend our algorithm to handle the case of cyclic s...
متن کاملCS 157 : Assignment 6 Douglas R . Lanman 8 May 2006 Problem 1 : Evaluating Convex Polygons
Problem 1: Evaluating Convex Polygons This write-up presents several simple algorithms for determining whether a given set of twodimensional points defines a convex polygon (i.e., a convex hull). In Section 1.1, we introduce the notion of regular polygons and provide examples of both convex and non-convex point sets. Section 1.2 presents an algorithm for ordering a set of points such that a cou...
متن کاملThe Renal Protective Effects of Corn Silk and Feijoa by using in situ Rat Renal System
Background: Corn silk (CS) is widely used in Iranian traditional medicine and Feijoa sellowiana(FS) is a native plant widespread in the Southern parts of Iran. The aim of the present study was to assess renal protective activities of CS and FS against dosage induced injury by ecstasy (MDMA) using insitu rat renal perfusion (IRRP) system.Methods: Hydro-alcoholic extract of CS and FS (10, 20, 40 ...
متن کاملar X iv : 0 80 6 . 32 58 v 3 [ cs . D S ] 5 S ep 2 00 8 Local Search Heuristics for the Multidimensional Assignment Problem
The Multidimensional Assignment Problem (MAP) (abbreviated sAP in the case of s dimensions) is an extension of the well-known assignment problem. The most studied case of MAP is 3-AP, though the problems with larger values of s have also a number of applications. In this paper we propose several local search heuristics for MAP and select the dominating ones. The results of computational experim...
متن کاملCS 545 : Assignment 8 A Scaled Conjugate Gradient Implementation for R Andy
3 Implementation Details 3 3.1 R Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3.2 C Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.2.1 Efficient Vector Manipulation Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.2.2 The Core SCG Implementation . . . . . . . . . ...
متن کامل